﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace ContentManager
{
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [Guid("5B076C01-2F26-11CF-9AE5-0800096E19F4")]
    public interface ISAPFunctions
    {
        [DispId(0x08)]
        [return: MarshalAs(UnmanagedType.IDispatch)]
        object Add([MarshalAs(UnmanagedType.BStr)] string functionName);

        [DispId(0x07)]
        void RemoveAll();

        
        object Connection
        {
            [DispId(0x04)]
            [return: MarshalAs(UnmanagedType.IDispatch)]
            get;

            [param: MarshalAs(UnmanagedType.IDispatch)]
            set;
        }

    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [Guid("695B9700-2F2C-11CF-9AE5-0800096E19F4")]
    public interface IFunction
    {
        [DispId(0x09)]
        [return: MarshalAs(UnmanagedType.IDispatch)]
        object get_Exports([MarshalAs(UnmanagedType.AsAny)] object index);

        [DispId(0x0a)]
        [return: MarshalAs(UnmanagedType.IDispatch)]
        object get_Imports([MarshalAs(UnmanagedType.AsAny)] object index);

        [DispId(0x06)]
        [return: MarshalAs(UnmanagedType.VariantBool)]
        bool Call();

        object Tables
        {
            [DispId(0x04)]
            [return: MarshalAs(UnmanagedType.IDispatch)]
            get;
        }

    }


    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [Guid("695B9702-2F2C-11CF-9AE5-0800096E19F4")]
    public interface IParameter
    {
        object Value
        {
            [DispId(0x03)]
            [return: MarshalAs(UnmanagedType.AsAny)]
            get;

            [param: MarshalAs(UnmanagedType.AsAny)]
            set;
        }
    }
}
